package mx.com.asteca.persistencia.entidades;
// Generated 31/07/2013 11:41:38 AM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Permisos generated by hbm2java
 */
@Entity
@Table(name="permisos"
    ,catalog="astecadb"
)
public class Permisos  implements java.io.Serializable {


     private int idPermiso;
     private Short alta;
     private Short cambios;
     private Short borrar;
     private Short consulta;
     private Short impresion;
     private Set<RolesModulos> rolesModuloses = new HashSet<RolesModulos>(0);
     private Set<RolesModPermisosSobre> rolesModPermisosSobres = new HashSet<RolesModPermisosSobre>(0);

    public Permisos() {
    }

	
    public Permisos(int idPermiso) {
        this.idPermiso = idPermiso;
    }
    public Permisos(int idPermiso, Short alta, Short cambios, Short borrar, Short consulta, Short impresion, Set<RolesModulos> rolesModuloses, Set<RolesModPermisosSobre> rolesModPermisosSobres) {
       this.idPermiso = idPermiso;
       this.alta = alta;
       this.cambios = cambios;
       this.borrar = borrar;
       this.consulta = consulta;
       this.impresion = impresion;
       this.rolesModuloses = rolesModuloses;
       this.rolesModPermisosSobres = rolesModPermisosSobres;
    }
   
     @Id 
     @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="ID_PERMISO", unique=true, nullable=false)
    public int getIdPermiso() {
        return this.idPermiso;
    }
    
    public void setIdPermiso(int idPermiso) {
        this.idPermiso = idPermiso;
    }
    
    @Column(name="ALTA")
    public Short getAlta() {
        return this.alta;
    }
    
    public void setAlta(Short alta) {
        this.alta = alta;
    }
    
    @Column(name="CAMBIOS")
    public Short getCambios() {
        return this.cambios;
    }
    
    public void setCambios(Short cambios) {
        this.cambios = cambios;
    }
    
    @Column(name="BORRAR")
    public Short getBorrar() {
        return this.borrar;
    }
    
    public void setBorrar(Short borrar) {
        this.borrar = borrar;
    }
    
    @Column(name="CONSULTA")
    public Short getConsulta() {
        return this.consulta;
    }
    
    public void setConsulta(Short consulta) {
        this.consulta = consulta;
    }
    
    @Column(name="IMPRESION")
    public Short getImpresion() {
        return this.impresion;
    }
    
    public void setImpresion(Short impresion) {
        this.impresion = impresion;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="permisos")
    public Set<RolesModulos> getRolesModuloses() {
        return this.rolesModuloses;
    }
    
    public void setRolesModuloses(Set<RolesModulos> rolesModuloses) {
        this.rolesModuloses = rolesModuloses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="permisos")
    public Set<RolesModPermisosSobre> getRolesModPermisosSobres() {
        return this.rolesModPermisosSobres;
    }
    
    public void setRolesModPermisosSobres(Set<RolesModPermisosSobre> rolesModPermisosSobres) {
        this.rolesModPermisosSobres = rolesModPermisosSobres;
    }




}


